<form method="post" id="frmSearch" action="<?= base_url() ?>angkatan/index/">
    <div style="text-align: center;vertical-align: middle;">
        <input type="text" name="txtSearch" id="txtSearch" value="<?= @$txtSearch ?>"/>
        <input type="submit" class="btn-primary" value="Cari"/>
    </div>
</form>
<table class="table table-bordered table-striped responsive-utilities">
    <thead>
        <tr>
            <th>Tahun</th>
            <th>Nama</th>
            <th>Action</th>
        </tr>
    </thead>
    <tbody>
        <? if (@$alumni) : ?>
            <? foreach ($alumni as $k => $v) : ?>
                <tr>
                    <td><?= $v->angkatan_year ?></td>
                    <td><?= $v->angkatan_name ?> ( Angkatan <?= $v->angkatan_year - 1994 ?> )</td>
                    <td>
                        <a href="<?= base_url() ?>angkatan/edit/<?= $v->angkatan_year ?>">Edit</a>
                    </td>
                </tr>
            <? endforeach; ?>
            <? if ($this->paginationpopup->create_links() <> "") : ?>
                <tr>
                    <th colspan="3" style="text-align: center;"><?php echo $this->paginationpopup->create_links(); ?></th>
                </tr>
            <? endif; ?>
        <? else : ?>
            <tr>
                <td colspan="3">Tidak ada data yang tersedia</td>
            </tr>
        <? endif; ?>
    </tbody>
</table>
<script>
    function pageClick(page){
        var action = $("#frmSearch").attr("action");
        $("#frmSearch").attr("action", action + page);
        $("#frmSearch").submit();
    };
</script>